gdk/wayland/surface: Track and apply buffer scale
authorGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Tue, 21 Mar 2023 23:04:56 +0000 (20:04 -0300)
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Thu, 30 Mar 2023 19:32:50 +0000 (16:32 -0300)
commit8217b6e484e7ba5a9d1cdc4dae57ac504b6feddd
treed4a2a18752065e126e6b15165f490850debf7237
parent5ee0e1956808bed25571e1e727dee098f1e7cb2c
gdk/wayland/surface: Track and apply buffer scale

Add a new flag to track whether buffer scale is dirty or not,
and centralize calling wl_surface_set_buffer_scale() in a single
place: gdk_wayland_surface_sync_buffer_scale().

gdk_wayland_surface_sync_buffer_scale() is only called by
gdk_wayland_surface_sync(), which itself is called by the GL,
Vulkan, and Cairo contexts, right before submitting a frame.
This ensure that each frame has an up-to-date buffer scale.

This mimics how opaque and input regions are tracked.
gdk/wayland/gdksurface-wayland-private.h
gdk/wayland/gdksurface-wayland.c